//
//  LeaderYijianCell.h
//  Estate
//
//  Created by heyong on 16/9/7.
//  Copyright © 2016年 ttsx. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol TextViewCellDelegate;
@interface LeaderYijianCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *deleteBtn;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UIImageView *stateImage;

@property (weak, nonatomic) IBOutlet UITextView *titleField;
@property (weak, nonatomic) id<TextViewCellDelegate> delegate;

@property (weak, nonatomic) IBOutlet UIButton *detailBtn;
//是否显示删除按钮
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *textLeftConstraint;


//是否能编辑
@property (assign, nonatomic)BOOL isEdit;
@property (unsafe_unretained, nonatomic) IBOutlet NSLayoutConstraint *iconLeftConstraint;

- (IBAction)clickDltBtn:(UIButton *)sender;
- (IBAction)clickDeilte:(UIButton *)sender;

@property (nonatomic, copy) void(^dltBlock)(void);
@property (nonatomic, copy) void(^detailBlick)(void);
@property (nonatomic,copy) void(^textValueChangedBlock)(NSString*);
+ (instancetype)cellWithTableView:(UITableView *)tableView;
- (void)setCellType:(NSString *)cellType State:(NSString *)state isIcon:(BOOL)icon;

@end

// 自定义协议
@protocol TextViewCellDelegate <NSObject>
- (void)textViewCell:(LeaderYijianCell *)cell didChangeText:(NSString *)text;
@end



